package com.wonder.global;

import com.wonder.enums.CarStatus;

import java.util.ArrayList;
import java.util.List;

public class Global {

    //标识当前是否已经连接TCP
    public  boolean canTcpConnected = false;
    //过滤tcp数据，需要的数据类型的枚举变量的list
    public List<String> abnormalCarStatusList = new ArrayList<String>()
    {
        {
            add(CarStatus.OverSpeed.getCode());
            add(CarStatus.EmergStop.getCode());
            add(CarStatus.StallProtected.getCode());
        }
    };

    private static final Global _global = new Global();

    private Global(){};

    public static Global getInstance(){
        return _global;
    }
}
